package myky.com.doctorapp.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.facebook.drawee.view.SimpleDraweeView
import com.github.nukc.stateview.Constant
import myky.com.doctorapp.R
import myky.com.doctorapp.api.Address
import myky.com.doctorapp.entity.DoctorTeamEntity
import myky.com.doctorapp.utils.UriUtils

class DoctoreTeamMenberAdapter(doctors:MutableList<DoctorTeamEntity.OtherdoctorsBean>) :BaseQuickAdapter<DoctorTeamEntity.OtherdoctorsBean,BaseViewHolder>(R.layout.bespeak_team_members_item,doctors) {
    override fun convert(helper: BaseViewHolder, item: DoctorTeamEntity.OtherdoctorsBean) {



        val simpleDraweeView = helper.getView<SimpleDraweeView>(R.id.bespeak_team_members_header)

        simpleDraweeView.setImageURI(UriUtils.getUriInstance().getUri(Constant.ONLINEPIC,Address.IMAGE+item.headPhoto))


        helper.setText(R.id.bespeak_team_members_name, item.realname)
        helper.setText(R.id.bespeak_team_members_level, mContext.resources.getStringArray(R.array.administrationName_level)[item.administrationname])
        helper.setText(R.id.bespeak_team_members_levels, mContext.resources.getStringArray(R.array.academicName_level)[item.academicname])
        helper.setText(R.id.bespeak_team_members_hospital, item.hospitalname)
        helper.setText(R.id.bespeak_team_members_ks, item.departmentname)



    }
}